<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Backbone Test Page</title>
<script type="text/javascript" src="./js/lib/jquery/1.8.3/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="./js/lib/underscore/underscore.js"></script>
<script type="text/javascript" src="./js/lib/backbone/1.0.0/backbone.js"></script>

<script type="text/javascript">

/**************** 路由与历史管理 **************************/

var Workspace = Backbone.Router.extend({
	routes: {
		"help" : "help",   //#help
		"search/:query" : "search",   //#search/paopao
		"search/:query/p:page": "search"   //#search/paopao/p2
	},

	help: function() {
		console.log("help!~");
	},

	search: function(query, page) {
		console.log(query, page);
	}
});

var w = new Workspace;
Backbone.history.start();


</script>
</head>
<body>

</body>
</html>